package com.cskaoyan.market.exception;

/**
 * @Author: 鲸落
 * @Date: 2024/05/20/15:05
 * @Version: 1.0
 * @Description:
 */

import com.cskaoyan.market.util.ResponseUtil;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Author 远志 zhangsong@cskaoyan.onaliyun.com
 * @Date 2024/5/20 10:06
 * @Version 1.0
 */
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(ParameterException.class)
    public Object exp1(Exception e){
        return ResponseUtil.fail(405,e.getMessage());
    }
}
